/*
 * PyrolysisHeatSourceKernal.C
 *
 *  Created on: 2017年7月24日
 *      Author: liuxiao
 */

#include "PyrolysisHeatSourceKernal.h"
registerMooseObject("TrilobitaApp", PyrolysisHeatSourceKernal);
template<>
InputParameters validParams<PyrolysisHeatSourceKernal>()
{
  InputParameters params = validParams<Kernel>();
  params.addClassDescription("Compute heat source kernel ");
  return params;
}

PyrolysisHeatSourceKernal::PyrolysisHeatSourceKernal(const InputParameters & parameters) :
  Kernel(parameters),
  _drhos_dt(getMaterialProperty<Real>("drhos_dt")),
  _pyrolysis_heat(getMaterialProperty<Real>("pyrolysis_heat")),
  _porosity(getMaterialProperty<Real>("porosity"))
{

}

Real PyrolysisHeatSourceKernal::computeQpResidual()
{
//	std::cout << _k[_qp] <<std::endl;
  Real r(0);
  r = -_drhos_dt[_qp]*_pyrolysis_heat[_qp] * _test[_i][_qp];
  return r;
}

Real PyrolysisHeatSourceKernal::computeQpJacobian()
{
  Real jac(0);
//  jac = _ks[_qp]*_grad_phi[_j][_qp] * _grad_test[_i][_qp];
  return -jac;
}




